Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Denormalize event type for request and event logs #829

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ezekg
Copy link
Member

@ezekg ezekg commented May 1, 2024

Part 1 of 4. Improves performance for Dashboard metrics.

Prerequisites

  • Cut new Keygen CE/EE versions so we release multi-user licenses before this.

Post deploy

Part 2 (in order of operations)

  • Backfill denormalized event_type_event from event_types to event_logs.
  • Add NOT NULL constraint to event_logs.event_type_event.
  • Add index on event_logs.event_type_event.
  • Run VACUUM ANALYZE event_logs.

Part 3 (in order of operations)

  • Backfill denormalized event_type_id and event_type_event from event_logs to request_logs.
  • Add NOT NULL constraints to request_logs.event_type_id and request_logs.event_type_event.
  • Add indexes on request_logs.event_type_id and request_logs.event_type_event.
  • Run VACUUM ANALYZE request_logs.

Part 4

  • Update EventLog.for_event_type to use denormalized event_type_event column for strings.
  • Update RequestLog.for_event_type to use denormalized event_type_event column.

@ezekg ezekg force-pushed the feature/denormalize-event-type-for-request-logs branch from 25135c0 to d0ebf37 Compare May 1, 2024 13:54
@ezekg ezekg force-pushed the feature/denormalize-event-type-for-request-logs branch from d0ebf37 to d78f333 Compare May 1, 2024 14:06
@ezekg ezekg force-pushed the feature/denormalize-event-type-for-request-logs branch from d78f333 to 5dde815 Compare May 1, 2024 14:50
@ezekg ezekg marked this pull request as ready for review May 1, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants